package com.home.qh.webapp.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.home.qh.model.City;
import com.home.qh.model.Country;
import com.home.qh.service.CityManager;
import com.home.qh.service.CountryManager;

@Controller
public class GuessController {
	private transient final Log log = LogFactory.getLog(GuessController.class);
	private CityManager cityManager;
	private CountryManager countryManager;

	@Autowired
	private ApplicationContext context;

	@Autowired
	public void setCityManager(CityManager cityManager) {
		this.cityManager = cityManager;
	}

	@Autowired
	public void setCountryManager(CountryManager countryManager) {
		this.countryManager = countryManager;
	}

	@RequestMapping(value = "/guessMenu.*", method = { RequestMethod.GET,
			RequestMethod.POST })
	public ModelAndView listCities(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (log.isDebugEnabled()) {
			log.debug("entering 'handleRequest' method...");
		}

		ModelAndView view = new ModelAndView("guessMenu");
		return view;

	}

}
